<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>退款详情 - Powered By ${systemConfig.systemName}</title>
<meta name="Author" content="webmall Team" />
<meta name="Copyright" content="webmall" />
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<#include "/WEB-INF/template/common/include.ftl">
<link href="${base}/template/shop/css/login.css" rel="stylesheet" type="text/css" />
<link href="${base}/template/shop/css/register.css" rel="stylesheet" type="text/css" />
<link href="${base}/template/shop/css/member_center.css" rel="stylesheet" type="text/css" />
<link href="${base}/template/shop/css/order.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${base}/template/shop/js/login.js"></script>
<script type="text/javascript" src="${base}/template/shop/js/register.js"></script>
<script>
$().ready( function() {
    
    $('.modalWindow').each(function(i){
    	$this = $(this);
		var trigger = $this.metadata().trigger;// showRegisterWindow激活元素
    	var closeClass = $this.metadata().closeClass;//registerWindowClose 关闭按钮
    	var formId = $this.metadata().formId;//registerWindowForm
	    $this.jqm({
			modal: true,// 是否开启模态窗口
			overlay: 30,// 屏蔽层透明度
			trigger: "."+trigger,// showRegisterWindow激活元素
			closeClass: closeClass,//registerWindowClose 关闭按钮
			onHide: function(hash) {
				$("#"+formId).resetForm();
	    		hash.o.remove();
	    		hash.w.fadeOut();
	    	},
	    	onShow: function(hash){
	    		hash.w.fadeIn();
		    }
		}).jqDrag(".windowTop");
	 });
    
    $(".addProof").click(function() {
		addProofFile('fileProof');
	});
});
             
    function addProofFile(id)
    {
        var trcomp="<tr height='50'><td><input type='file' name='refundProof'/></td>";
     	$("#"+id+" tr:last-child").before(trcomp);
    }
</script>
</head>
<body class="memberCenter">
	<#include "/WEB-INF/template/shop/header.ftl">
	<div class="body orderList">
		<div class="bodyLeft">
			<#include "/WEB-INF/template/shop/member_center_left.ftl">
		</div>
		<div class="bodyRight">
			<div class="memberCenterDetail">
				<div class="top">退款详情[${refund.refundSn}]</div>
				<div class="middle">
					<div class="order_status">
						<div class="desc">
							<div <#if refund.refundStatus == 'requested'> class="step_checked" <#else> class="step_unchecked" </#if>>
								已申请维权
							</div>
							<div <#if refund.refundStatus == 'processed'> class="step_checked" <#else> class="step_unchecked" </#if>>
								买卖双方协调中
							</div>
							<div <#if refund.refundStatus == 'platformed'> class="step_checked" <#else> class="step_unchecked" </#if>>
								平台处理
							</div>
							<div <#if refund.refundStatus == 'completed' || refund.refundStatus=='closed' || refund.refundStatus=='canceled'> class="step_checked" <#else> class="step_unchecked" </#if>>
								维权处理结果
							</div>
						</div>
                        <div style="width:100%;height:20px;">
                        &nbsp;
                        </div>
						<div class="seq">
                            <div <#if refund.refundStatus == 'requested'> class="step_checked" <#else> class="step_unchecked" </#if>>
								<label>1</label>
							</div>
							<div <#if refund.refundStatus == 'processed'> class="step_checked" <#else> class="step_unchecked" </#if>>
								<label>2</label>
							</div>
							<div <#if refund.refundStatus == 'platformed'> class="step_checked" <#else> class="step_unchecked" </#if>>
								<label>3</label>
							</div>
							<div <#if refund.refundStatus == 'completed' || refund.refundStatus=='closed' || refund.refundStatus=='canceled'> class="step_checked" <#else> class="step_unchecked" </#if>>
								<label>4</label>
							</div>
						</div>
					</div>
					<div class="blank"></div>
					<div class="operationInfo">
						<strong class="green">退款处理:</strong>
                        <span class="" style="line-height:30px;">
                          ${refund.dealDescStr}&nbsp;&nbsp;&nbsp;&nbsp;
                            <#if refund.processStatus=='saler_refused' >
                            	${refund.salerReason} 
                            </#if>
                        </span>
                        <div class="blank"></div>
	                    <#if (refund.refundStatus == 'processed' || refund.refundStatus == 'platformed') 
	                           && (refund.processStatus=='saler_agreed' || refund.processStatus == 'platform_agreed') 
	                           && refund.shippingStatus=='unshipped' && refund.receiver.address?length != 0 >
	                        <span class="" style="line-height:30px;">
	                        	${refund.receiver.address}    
	                        </span>
                       		 <div class="blank"></div>
                                <input type="button" class="formButton process_shippedBtn" value="物流信息" />
                        </#if>
                        
                        <#if refund.refundStatus == "processed" && refund.processStatus == 'agreed' && refund.shippingStatus=='unshipped'>
                            <#if refund.goodsStatus!='noRecevied'>
								<input type="button" class="formButton process_viewShippingBtn" onclick="window.open('http://www.kuaidi100.com/chaxun?com=yunda&nu=1900171113992','_target');" value="查看物流" />
                            </#if>
						</#if>
						<#if refund.refundStatus == "processed" && refund.processStatus == 'saler_refused'>
							<input type="button" class="formButton process_platformedBtn" value="申请仲裁" />
						</#if>
                        <#if refund.refundStatus =="closed" || refund.refundStatus == "completed" || refund.refundStatus == "canceled">
                        <#else>
                            <input type="button" class="formButton process_cancelBtn" value="取消退货" />	
                        </#if>
                        
                        
					</div>
					<div class="blank"></div>
                    <div class="body" style="width:100%;">
	                    <div class="left" style="width:69%;">
                             <table class="listTable">
								<tr>
									<th>证据</th>
								</tr>
                                <tr>
								<td> 
                                 <#list refund.refundproofSet as list>
                                <img width=200 height=200 src="${base}/${list.proofUrl}" style="float:left;margin:20px;width:200px;height200px;" />
							</#list>
                                 </td>
								</tr>
							</table>
                             <div class="blank"></div>
                             <form class="validate" name="proof" action="refund!proofSave.action" method="post" enctype="multipart/form-data">
                                 <input type="hidden" name="id" value="${refund.id}" />
	                             <table id="fileProof" class="inputTable">
                                     <tr><th style="text-align:left;padding-left:8px;">添加证据</th></tr>
			                         <tr height="50">
			               				 <td>
			                   				 <div class="btn_yellow addProof" style="float:right;text-align:center;">添加</div>
			                			</td>
			            			</tr> 
								 </table>
		                         <div class="blank"></div>
		                         <center><input type="submit" class="formButton" value="提交" /></center>
                             </form>
	                    </div>
	                    <div class="right" style="width:30%;">
                            <table class="listTable">
								<tr>
									<th>退款信息</th>
								</tr>
                                
                                <tr>
									<td>
					                   退款编号:${refund.refundSn}
									</td>
								</tr>
								<tr>
									<td>
					                   订单编号:${(refund.order.orderSn)!}
									</td>
								</tr>
                                <tr>
									<td>
					                   联系方式:${(refund.cellnumber)!}
									</td>
								</tr>
                                <tr>
                                    <td>
					                   退款类型: ${action.getText("RefundType." + refund.refundType)}
									</td>
								</tr>
					            <tr>
									<td>
                                       	退款要求: ${action.getText("RefundReq." + refund.refundReq)}
									</td>
								</tr>
					            <tr>
									<td>
                                       	商品状态:${action.getText("GoodsStatus." + refund.goodsStatus)}
									</td>
								</tr>
								<tr>
									<td>
                                        收货类型: 
                               			 <#if (refund.isSelfSign) >
                                           	 本人签收
                                         <#else>
                                                	他人代收
                                         </#if>
									</td>
								</tr>
								<tr>
									<td>
                                         备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注:${refund.memo}
									</td>
								</tr>
								<tr>
									<td>
                                         退货物流:${refund.deliveryCorpName}
									</td>
								</tr>
								<tr>
									<td>
									物流编号:${refund.shippingNo}
									</td>
								</tr>
							</table>
							<div class="blank"></div>
							<table class="listTable">
								<tr>
									<th>商品名称</th>
								</tr>
								<#list refund.order.orderItemSet as list>
									<tr>
										<td>
											<a href="${base}${list.productHtmlFilePath}" target="_blank">
		                                        <img src="${base}${(list.productitem.product.productImageList[0].thumbnailProductImagePath)!systemConfig.defaultThumbnailProductImagePath}" style="width:60px;height:60px;" />
											${list.productName}
		                                        <#if (list.productitem.color != null && list.productitem.propertiesValue != null)>
									    					[颜色:${(list.productitem.color.name)!},尺寸:${(list.productitem.propertiesValue.lable)!}]
									    			<#elseif (list.productitem.color != null && list.productitem.propertiesValue == null)>
									    					[颜色:${(list.productitem.color.name)!}]
									    			<#elseif (list.productitem.propertiesValue != null)>
									    					[尺寸:${(list.productitem.propertiesValue.lable)!}]
									    			</#if>
		                                    </a>
										</td>
										
									</tr>
								</#list>
							</table>
	                    </div>
                    </div>
                    <div class="blank"></div>
					<table class="listTable">
						<tr>
							<th colspan="3">留言记录</th>
						</tr>
					</table>
                    <#list refund.refundnoteSet as list>
						<div class="" style="display:table;width:100%;">
							<div class="left" style="width:120px;padding-left:4px;margin-top:10px;">${list.member.name}</div>
							<div class="right" style="width:80%;">
                                <div class="top1" style="line-height:20px;margin-top:10px;">${list.createDate?string("yyyy-MM-dd HH:mm:ss")}</div>
                                <div style="line-height:30px;">
                                	${list.content} 
                                    </br>
                                </div>
                            </div>
						</div>
					</#list>
                    
                    <div class="blank"></div>
                     <form name="notes" action="refund!savenote.action" method="post">
                         <input type="hidden" name="id" value="${refund.id}" />
                         <table id="fileNotes" class="inputTable">
                             <tr><th style="text-align:left;padding-left:8px;">留言内容</th></tr>
	                         <tr>
	               				 <td>
                                     <textarea name="refundnote.content" class="wysiwyg required" style="width: 100%; height: 250px;">${(product.attributes)!}</textarea>
	                			</td>
	            			</tr> 
						</table>
                         <div class="blank"></div>
                        <center><input type="submit" class="formButton" value="提交" /></center>
                     </form>
					<div class="blank"></div>
				</div>
				<div class="bottom"></div>
			</div>
		</div>
		<div class="blank"></div>
		<#include "/WEB-INF/template/shop/friend_link.ftl">
	</div>
	<div class="blank"></div>
	<#include "/WEB-INF/template/shop/footer.ftl">
        
    <div class="registerWindow modalWindow {trigger:'process_shippedBtn',closeClass:'process_shippedClose',formId:'process_shipped'}" style="padding:4px;padding-right:10px;">
        <div class="windowTop" style="background-repeat:repeat-x;">
            <div class="windowTitle">退款处理--物流信息</div>
            <a class="windowClose process_shippedClose" href="#" hidefocus="true"></a>
        </div>
        <div class="windowMiddle">
             <form id="process_shipped" action="refund!saveShipping.action" method="post" >
                 <@s.token />
				<input type="hidden" name="id" value="${refund.id}" />
                 <table class="inputTable">
                     <tr><th style="text-align:left;padding-left:8px;">物流信息</th><td>
                            <select name="refund.deliveryCorpName">
				                <#list allDeliveryCorp as list>
				                	<option value="${list.name}">${list.name}</option>
				                </#list>
				            </select>
            			</td>
                     </tr>
                     <tr>
           				<th style="text-align:left;padding-left:8px;">快递号</th> <td>
                            <input type="text" name="refund.shippingNo" value="" style="width:160px;" />
            			</td>
        			</tr> 
				</table>
                 <div class="blank"></div>
                <center><input type="submit" class="formButton" value="提交" /></center>
             </form> 
            
        </div>
    	<div class="windowBottom"></div>
   </div>
        
    <div class="registerWindow modalWindow {trigger:'process_platformedBtn',closeClass:'process_platformedClose',formId:'process_platformed'}" style="padding:4px;padding-right:10px;">
        <div class="windowTop" style="background-repeat:repeat-x;">
            <div class="windowTitle">退款处理--申请仲裁</div>
            <a class="windowClose process_platformedClose" href="#" hidefocus="true"></a>
        </div>
        <div class="windowMiddle">
             <form id="process_platformed" action="refund!processSave.action" method="post" >
                 <@s.token />
				<input type="hidden" name="id" value="${refund.id}" />
                <input type="hidden" name="processStatus" value="platform_joined" />
                 <div class="blank"></div>
                <center><input type="submit" class="formButton" value="提交" /></center>
             </form> 
            
        </div>
    	<div class="windowBottom"></div>
   </div>
    
   <div class="registerWindow modalWindow {trigger:'process_cancelBtn',closeClass:'process_cancelClose',formId:'process_cancel'}" style="padding:4px;padding-right:10px;">
        <div class="windowTop" style="background-repeat:repeat-x;">
            <div class="windowTitle">退款处理--取消</div>
            <a class="windowClose process_cancelClose" href="#" hidefocus="true"></a>
        </div>
        <div class="windowMiddle">
             <form id="process_cancel" action="refund!processSave.action" method="post" >
                 <@s.token />
				<input type="hidden" name="id" value="${refund.id}" />
                <input type="hidden" name="processStatus" value="canceled" />
                 <div class="blank"></div>
                <center><input type="submit" class="formButton" value="提交" /></center>
             </form> 
            
        </div>
    	<div class="windowBottom"></div>
   </div>
</body>
</html>